<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            div{
               width: 300px;
                background-color: #E8E8E8;
                padding:10px;
                position: absolute;
            }
            input{
                width: 260px;
                padding: 10px 20px;
                border: none;

            }
            img{
                position: absolute;
                right: 40px;
                top:15px;
            }
            p{
                display: inline-block;
                margin:0;
                font-size: 12px;
                color: red;
            }
        </style>
    </head>
    <body>
        <div>
            <input type="text" placeholder="请输入用户名">
            <img src="http://doc.canglaoshi.org/tstore_v1/images/login/yhm.png" alt="">
            <p>用户名不能为空</p>
        </div>
    </body>
</html>